//
//  DemandsViewCell.m
//  ForestPack
//
//  Created by 骆锴 on 2018/7/18.
//  Copyright © 2018年 郑洲. All rights reserved.
//

#import "DemandsViewCell.h"

@implementation DemandsViewCell

+ (DemandsViewCell *)cellWithTableView:(UITableView *)tableView andIndexPath:(NSIndexPath *)indexPath{
    static NSString *cellID = @"demandscell";
    DemandsViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
    if (cell == nil) {
        cell = [[DemandsViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
        cell.backgroundColor = [UIColor whiteColor];
        [cell createSubView];
    }
    
    return cell;
}

-(void)createSubView{
    UIView *bg = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, ScreenX375(150))];
    
    bg.backgroundColor = [UIColor whiteColor];
    UILabel *title = [[UILabel alloc] initWithFrame:CGRectMake(ScreenX375(13), ScreenX375(16), ScreenX375(58), ScreenX375(14))];
    title.font = Kfont(14);
    title.text = @"需  求 :";
    title.textColor = [UIColor blackColor];
    [bg addSubview:title];
    
    UITextField *demands = [[UITextField alloc] initWithFrame:CGRectMake(ScreenX375(13), ScreenX375(39), ScreenX375(349), ScreenX375(112))];
    demands.placeholder = @"请尽可能描述您的需求(包装材质、印刷工艺、尺寸、用途)";
    demands.font = Kfont(12);
    demands.textAlignment = NSTextAlignmentLeft;
    [bg addSubview:demands];
    
    [self addSubview:bg];
}
@end
